package cn.mesmile.flow.config.test;

import org.omg.CORBA.PUBLIC_MEMBER;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author zb
 * @date 2020/12/8 15:05
 * @Description
 */
@Configuration
public class MySpringConfig {

    /**
     * 构造方法注入
     * @Bean(initMethod = "init",destroyMethod = "destroy")
     */
    @Bean
    public PersonJob getPersonJob() {
        return new PersonJob();
    }

    @Bean
    public Student getStudent(PersonJob PersonJob) {
        Student student = new Student("姓名", 20);
        student.setPersonJob(PersonJob);
        return student;
    }


}
